package com.nd.teamfile.fileexplorer.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;

import com.nd.teamfile.fileexplorer.R;
import com.nd.teamfile.fileexplorer.fragment.FileExplorerFragment;

/**
 * 文件浏览界面
 * 
 * @ClassName FileExplorerActivity
 * @Function TODO ADD FUNCTION
 * @Reason TODO ADD REASON
 * 
 * @author HuangYK
 * @version v1.3.3
 * @Date 2014-1-26 下午11:51:35
 * 
 * @see
 */
public class FileExplorerActivity extends FragmentActivity {

	private FileExplorerFragment mFragment;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_file_explorer);
		if (mFragment == null)
			mFragment = (FileExplorerFragment) getSupportFragmentManager()
					.findFragmentById(R.id.fragment);
	}

	public Fragment getFragment(int tabIndex) {
		return mFragment;
	}

	@Override
	public void onBackPressed() {
		if (!mFragment.onBack()) {
			super.onBackPressed();
		}
	}

}
